//
//  STXYChooserCellModel.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/21.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "STXYChooserCellModel.h"

#import "DeclarationInfoData.h"

@interface STXYChooserCellModel ()

@property (nonatomic, readwrite, copy) NSString* content;

@end

@implementation STXYChooserCellModel

- (instancetype)initWithData:(id)data cellHeight:(CGFloat)cellHeight
{
    self = [super init];
    if (self)
    {
        _isChoose = NO;
        
        _data = data;
        
        /// cellHeight+2（2容错）
        _cellHeight = MHUIScaleValue(cellHeight)+2;
        
        @weakify(self);
        [[RACObserve(self, data) distinctUntilChanged] subscribeNext:^(id x)
         {
             @strongify(self);
             
             DeclarationInfoData* dInfoData = x;
             
             self.content = dInfoData.content;
         }];
    }
    
    return self;
}

@end
